program Tangent;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a1, b1, c1, a2, b2, c2, x1, y1, x0, y0, r, y, x, d : real;
begin
  writeln('R=');
  readln(r);
  writeln('x0, y0 =');
  readln(x0, y0);
  writeln('x1, y1 =');
  readln(x1, y1);

  x := x0 - x1;
  y := y0 - y1;
  a1 := (-x*r - y*Sqrt(x*x + y*y- r*r)) / (x*x + y*y);
  b1 := (-y*r + x*Sqrt(x*x + y*y- r*r)) / (x*x + y*y);
  c1 := -a1*x0 - b1*y0 ;
  writeln(a1:0:2,'*x+(',b1:0:2,')*y+(',c1:0:2,')=0');

  a1 := ((-1)*x*r + y*(sqrt(x*x + y*y - r*r))) / (x*x + y*y);
  b1 := ((-1)*y*r - x*(sqrt(x*x + y*y - r*r))) / (x*x + y*y);
  c2 := (-1)*a2*x0 - b2*y0 ;
  writeln(a2:0:2,'*x+(',b2:0:2,')*y+(',c2:0:2,')=0');

  readln;

end.
 